#ifndef CUSTOM_FRAME_LISTENER_H
#define CUSTOM_FRAME_LISTENER_H

#include <CEGUIOgreRenderer.h>
#include <CEGUI.h>
#include <Ogre.h>
#include <OIS/OIS.h>
#include "NxOgre.h"

using namespace Ogre;

class CustomFrameListener: public FrameListener, public OIS::KeyListener, public OIS::MouseListener
{
    public:
        CustomFrameListener();
        bool frameStarted(const Ogre::FrameEvent &evt);

         //KeyListener.
        bool keyPressed(const OIS::KeyEvent &e);
        bool keyReleased(const OIS::KeyEvent &e);

        //MouseListener.
        bool mouseMoved(const OIS::MouseEvent &e);
        bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
        bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);

        bool quit(const CEGUI::EventArgs &e);

        //Permet de convertir l'ID OIS en ID CEGUI.
        CEGUI::MouseButton convertButtonId(const OIS::MouseButtonID _buttonID);
    private:
        bool appContinue;       
        
};

#endif